<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <h:head>
        <title>BrasilFA - O seu site de Futebol Americano</title>
    </h:head>
    <h:body>
        <h:form>
            <h:dataTable var="item" value="#{timeBean.all}" border="1" cellpadding="5" cellspacing="1">
                <h:column>
                    <f:facet name="header">Código</f:facet>
                    <h:outputText value="#{item.id}" />
                </h:column>
                <h:column>
                    <f:facet name="header">Nome</f:facet>
                    <h:outputText value="#{item.name}" />
                </h:column>
                <h:column>
                    <f:facet name="header">Opções</f:facet>
                    <h:commandLink value="Editar" action="#{timeBean.alterar(item)}" />
                    &nbsp;
                    <h:commandLink value="Excluir" action="#{timeBean.excluir(item)}" />
                    &nbsp;
                    <h:commandLink value="Jogadores" action="#{timeJogadoresBean.GerenciarJogadores(item)}" />
                </h:column>
            </h:dataTable>
            <h:button outcome="cadastro_time" value="Inserir" />
            <h:button outcome="area_inicial" value="Voltar" />
        </h:form>
    </h:body>
</html>

